﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using Sharp.Infrastructure;
using Sharp.Platform.Interface;
using Sharp.Platform.Mvc.Models;

namespace Sharp.WebBooter.Areas.CMS.Models
{
    public partial class MessageModel : BaseViewModel, IViewModel
    {
        /// <summary>
        /// 主键
        /// </summary>
        [HiddenInput]
        public Guid Id { get; set; }
        /// <summary>
        /// 标题
        /// </summary>
        [Display(Name = "标题")]
        public string Title { get; set; }
        /// <summary>
        /// 摘要
        /// </summary>
        [Display(Name = "摘要")]
        public string Summary { get; set; }
        /// <summary>
        /// 内容
        /// </summary>
        [Display(Name = "内容"), DataType(DataType.Html)]
        public string Content { get; set; }
        /// <summary>
        /// 缩略图
        /// </summary>
        [Display(Name = "缩略图"), DataType(DataType.ImageUrl)]
        public string Img { get; set; }

        /// <summary>
        /// 发布时间
        /// </summary>
        [Display(Name = "发布时间"), DataType(DataType.DateTime), Required]
        public DateTime PublishTime { get; set; }
        /// <summary>
        /// 提前提醒
        /// </summary>
        [Display(Name = "提前提醒"), DataType(DataType.DateTime)]
        public DateTime? RemindTime { get; set; }

    }

    public partial class MessageModel : ISharpForm
    {
        public MessageModel()
        {
            UI = new SharpFromUI();
            this.UI.Width = 700;
        }
        public SharpFromUI UI { get; set; }
    }
}
